import Vue from 'vue'
import Vuex from 'vuex'
//导入购物车模块
import cart from './cart.js'
import user from './user.js'

Vue.use(Vuex)
//创建store的实例对象
const store = new Vuex.Store({
  //挂载store模板
  modules: {
    // cart: cart
    cart,
    user,
  }
})

//向外共享STORE实例对象
export default store